package com.lkq.gms.controller;

import com.lkq.gms.dto.TotalScores;
import com.lkq.gms.service.TotalScoresService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @ClassName TotalScoresController
 * @Description TODO
 * @Author dell
 * @Date 2020/6/29-22:57
 * @Version 1.0
 **/
@Controller
@RequestMapping("/total")
public class TotalScoresController {
    @Autowired
    private TotalScoresService scoresService;
    //获取全年级所有成绩
    @GetMapping("/list")
    public String list(Model model){
        List<TotalScores> scoresList = scoresService.findAll();
        model.addAttribute("total_scores",scoresList);
        return "/score/total_scores-list";
    }
}
